home *** CD-ROM | disk | FTP | other *** search
/ 130 MIDI Tool Box / 130 MIDI Tool Box.iso / mqupdate / expr.mbt < prev    next >
Text File  |  1990-06-22  |  801b  |  32 lines

  1. ;=============================================================================
  2. ; This example illustrates how to use logical expressions
  3. ;
  4. ; Copyright 1989 by DMA Software
  5. ; All rights reserved
  6. ;=============================================================================
  7. echo    off
  8. set     i 0
  9. printformat "%ld"
  10. while   i >= 0  &  i < 16
  11.   if i > 6  &  i < 9
  12.     print i "is greater than 6, but less than 9"
  13.   else
  14.     if i <= 6 | i == 10
  15.       print i "is less than or equal to 6 or exactly equal to 10"
  16.     else
  17.       print i "is == 9 or greater than 10"
  18.     endif
  19.   endif
  20.   add   i 1
  21. end
  22. if i == 16
  23.   print i "is the terminal loop value"
  24. endif
  25. ;
  26. ; Looking at the sysex buffer
  27. ;
  28. set buffer[0] 0xF0
  29. if buffer[0] == 0xF0
  30.   print "There's a sysex in the buffer"
  31. endif
  32.